#!/bin/bash

# openssh执行make install-files时会安装的文件
files=(
/etc/ssh/
/usr/bin/ssh
/usr/bin/scp
/usr/bin/ssh-add
/usr/bin/ssh-agent
/usr/bin/ssh-keygen
/usr/bin/ssh-keyscan
/usr/sbin/sshd
/usr/libexec/sshd-session
/usr/libexec/ssh-keysign
/usr/libexec/ssh-pkcs11-helper
/usr/libexec/ssh-sk-helper
/usr/bin/sftp
/usr/libexec/sftp-server
)

now=$(date +%s)

for i in "${files[@]}"
do
    cp "$i" "$i.bak.$now"
done
